<!--#include file="../../commond.asp" -->
<!--#include file="../../header.asp" -->
<!--#include file="../../plugins.asp" -->
<!--#include file="../../common/ModSet.asp" -->
<!--#include file="../../common/UBBconfig.asp" -->

<!--内容-->
<style>
	CFace:link,.CFace:visited{padding:1px;padding-left:0px;padding-right:0px;border:1px solid #164283;background:#c9dbf5;border-bottom-width:3px;}
	CFace:hover{padding:1px;padding-left:0px;padding-right:0px;border:1px solid #164283;background:#9bbbec;border-bottom-width:3px}
	LFace:link,.LFace:visited{padding:1px;}
	LFace:hover{padding-left:0px;padding-right:0px;border:1px solid #164283;background:#c9dbf5}
</style>
	 <div id="Tbody">
	  <div id="mainContent">
	   <div id="innermainContent">
	    <div id="mainContent-topimg"></div>
	 <%=content_html_Top%>
	<%'在这里写代码，为了保证页面完整性，其他地方尽量不要修改 %>
	  <div id="Content_Contentlist" class="content-width">
<%
Dim GBSet,Getplugins,action,replyMsg,MsgID,MsgReplyContent,EditMsg
	Set GBSet=New ModSet
	replyMsg=False
	EditMsg=False
	action = Request.QueryString("action")
	MsgID = CheckStr(Request.QueryString("id"))
	If action="Reply" Then replyMsg=True
	If action="EditMsg" Then editMsg=True

Dim GuestDB,GuestNum,PageCount
	Set GuestDB=Server.CreateObject("Adodb.Recordset")
	If replyMsg Or editMsg Then
		SQL="select * from blog_book where book_id=" & MsgID
	Else
		SQL="select * from blog_book order by book_ID desc"
	End If

	SQLQueryNums=SQLQueryNums+1
	GuestDB.Open SQL,CONN,1,1
	Url_Add=Url_Add&"plugins=GuestBookForPJBlog&"

If replyMsg Or editMsg Then
	If GuestDB.eof And GuestDB.bof Then
		showmsg "错误信息","不存在此留言,或该留言已经被删除!<br/><a href=""javascript:history.go(-1)"">单击返回</a>","WarningIcon",""
	End If

	If not(stat_Admin Or GuestDB("book_Messager")=memName And memName<>empty) Then
		showmsg "错误信息","你没有权限进行此项操作！<br/><a href=""javascript:history.go(-1)"">单击返回</a>","WarningIcon",""
	End If

	If MsgID=Empty Or IsInteger(MsgID)=False Then 
		showmsg "错误信息","非法操作！<br/><a href=""javascript:history.go(-1)"">单击返回</a>","WarningIcon","" 
	End If
End If

	Getplugins=CheckStr(Request.QueryString("plugins"))
	GBSet.open(Getplugins)

	If Not cBool(GBSet.getKeyValue("OpenState")) Then
		showmsg "错误信息","留言本暂时关闭！<br/><a href=""default.asp"">单击返回首页</a>","WarningIcon",""
	End If

Dim bookPage,OpenFace,CanChange,canDel,ReCheck,ChangeTime,showipwho,showipwhat,getuserip,showico,changetime_a,CanGuest,cut,canMessage,canguestquick,rndsize,showipwhatimg
	bookPage=int(GBSet.getKeyValue("bookPage"))
	OpenFace=GBSet.getKeyValue("OpenFace")
	CanChange=GBSet.getKeyValue("canchange")
	canDel=GBSet.getKeyValue("canDel")
	ChangeTime=GBSet.getKeyValue("ChangeTime")
	showico=GBSet.getKeyValue("showico")
	showipwho=GBSet.getKeyValue("showipwho")
	showipwhat=GBSet.getKeyValue("showipwhat")
	getuserip=GBSet.getKeyValue("getuserip")
	CanGuest=GBSet.getKeyValue("CanGuest")
	cut=GBSet.getKeyValue("cut")
	canMessage=GBSet.getKeyValue("CanMessage")
	canguestquick=GBSet.getKeyValue("CanGuestquick")
	rndsize=GBSet.getKeyValue("rndsize")
	showipwhatimg=GBSet.getKeyValue("showipwhatimg")
	GuestDB.PageSize=bookPage

	If Not GuestDB.eof Then 
		GuestDB.AbsolutePage=CurPage
	End If

	GuestNum=GuestDB.RecordCount
	If Not (GuestDB.eof And GuestDB.bof) Then
		If Not replyMsg Or Not editMsg Then
			If (canMessage=1 And memName=empty) Or (canMessage=2 And Not stat_Admin) Or replyMsg Or editMsg Then
			Else
				response.write "<div class=""pageContent"">"&MultiPage(GuestNum,bookPage,CurPage,Url_Add,"","float:right","")&"</div>"
			End If
		End If
	End If%>

<%'留言框部分
	If CanGuest=0 And memName=empty And Not (replyMsg Or editMsg) Then%>
		<center>[管理员关闭了<font color="red">游客留言</font>功能,想要留言请先注册<a href="register.asp" title="加入本站哦">注册账号</a>]</center><%
	Else%>
	
	<table border="0" width="99%" cellspacing="0" cellpadding="0">
		<%If cut=1 And Not (replyMsg Or editMsg) Then%>
			<a href="javascript:scroll(0,0),addQuote('','')" onclick="$('MsgContent').style.display=$('MsgContent').style.display=='none'?'':'none';" title="留言请单击此处"><center>[<b>留言请单击此处</b>]</center></a>
		<%End If%>
		
		
		<tr><td>
		<div id="MsgContent" style="width:99%;" <%If cut=1 And Not (replyMsg Or editMsg) Then response.write "style=""display:none"""%>>
			<div id="MsgHead">
			<%If replyMsg Then
				response.write "回复留言"
			ElseIf editMsg Then
				response.write "编辑留言"
			Else
				response.write "发表留言"
			End If%>
			</div>
			<div id="MsgBody">
			<form name="frm" action="Plugins/<%=GBSet.GetPath%>/bookaction.asp" method="post" onsubmit="return CheckPost()" style="margin:0px;">
		<table width="99%" cellpadding="0" cellspacing="0">
			<%If Not replyMsg And Not editMsg Then%>
				<tr><td align="right" width="70"><input type="hidden" name="ChangeTime" value="<%=GBSet.getKeyValue("ChangeTime")%>"/><strong>昵　称:</strong></td><td align="left" style="padding:3px;"><input name="username" type="text" size="18" class="userpass" maxlength="24" <%if not memName=empty then response.write ("value="""&memName&""" readonly=""readonly""")%>/>
				您当前的权限:[<%=stat_title%>]&nbsp;<%If memName=empty Then%>[<a href="login.asp">登录</a>]&nbsp;[<a href="register.asp">注册</a>]<%Else%><a href="login.asp?action=logout">[退出]</a><%End If%></td></tr>
				<%If memName=empty Then%>
					<tr><td align="right" width="70"><strong>密　码:</strong></td><td align="left" style="padding:3px;"><input name="password" type="password" size="18" class="userpass" maxlength="24"/>&nbsp;没有帐号可以不输入密码</td></tr>
					<tr><td align="right" width="70"><strong>邮　箱:</strong></td><td align="left" style="padding:3px;"><input name="myblogemail" type="text" size="18" class="userpass" maxlength="24"/> 邮件地址支持<a href="http://www.gravatar.com/site/signup/" title="没有Gravatar头像？在线申请吧..." target="_blank">Gravatar</a>头像,邮箱地址不会公开.</td></tr>
					<tr><td align="right" width="70"><strong>网　址:</strong></td><td align="left" style="padding:3px;"><input name="myblogsiteurl" type="text" class="userpass" value="" size="18" maxlength="24" onfocus="If (this.value.length >= 0 && this.value.substring(0, 7) != 'http://'){this.value = 'http://' + this.value}" onblur="If (this.value.length >= 0 && this.value.substring(0, 7) != 'http://'){this.value = 'http://' + this.value}Else{If (this.value == 'http://'){this.value = ''}}"/> 输入网址便于回访.</td></tr>
				<%End If
				If Not stat_Admin And OpenFace=1 And Not blog_GravatarOpen Then '这段代码可能有问题%>
					<tr><td align="right" width="70" valign="top"><strong>头　像:</strong></td>
					<td style="padding:2px;" align="left">
					<input type="hidden" name="book_face" value="<%If editMsg Then response.write GuestDB("book_face") Else response.write "face1" End If%>"/>
					<a href="javascript:void(0)" class="CFace" id="face1" onclick="S('face1')"><img src="<%response.write GBSet.getKeyValue("face1")%>" alt="" border="0"/></a>
					<a href="javascript:void(0)" class="LFace" id="face2" onclick="S('face2')"><img src="<%response.write GBSet.getKeyValue("face2")%>" alt="" border="0"/></a>
					<a href="javascript:void(0)" class="LFace" id="face3" onclick="S('face3')"><img src="<%response.write GBSet.getKeyValue("face3")%>" alt="" border="0"/></a>
					<a href="javascript:void(0)" class="LFace" id="face4" onclick="S('face4')"><img src="<%response.write GBSet.getKeyValue("face4")%>" alt="" border="0"/></a>
					<a href="javascript:void(0)" class="LFace" id="face5" onclick="S('face5')"><img src="<%response.write GBSet.getKeyValue("face5")%>" alt="" border="0"/></a>
					<a href="javascript:void(0)" class="LFace" id="face6" onclick="S('face6')"><img src="<%response.write GBSet.getKeyValue("face6")%>" alt="" border="0"/></a>
					<a href="javascript:void(0)" class="LFace" id="face7" onclick="S('face7')"><img src="<%response.write GBSet.getKeyValue("face7")%>" alt="" border="0"/></a>
					<a href="javascript:void(0)" class="LFace" id="face8" onclick="S('face8')"><img src="<%response.write GBSet.getKeyValue("face8")%>" alt="" border="0"/></a>
					<script type="text/javascript">
					var LastA=document.getElementById("face1")
					Function S(Face){
					LastA.className="LFace"
						document.getElementById(Face).className="CFace"
						LastA=document.getElementById(Face)
						document.getElementById(Face).blur()
						document.forms["frm"].book_face.value=Face
					}
					</script>
					</td></tr><%
				End If
			End If

			If replyMsg Then
				MsgReplyContent=GuestDB("book_reply")
			ElseIf editMsg Then
				MsgReplyContent=GuestDB("book_Content")
				ReCheck=GuestDB("book_HiddenReply")
			Else
				MsgReplyContent=""
			End If%>
			<tr><%If Not replyMsg And Not editMsg Then%><td align="right" width="70" valign="top"><strong>内　容:</strong><br/><%End If%>
				</td><td style="padding:2px;">
				<%UBB_TextArea_Height="150px;"
				UBB_Tools_Items="bold,italic,underline,deleteline"
				UBB_Tools_Items=UBB_Tools_Items&"||image,link,mail,quote,smiley"
				UBB_Msg_Value=UBBFilter(UnCheckStr(MsgReplyContent))
				UBBeditor("Message")%>
				</td>
			</tr>
				<%If Not stat_Admin And (memName=empty Or (blog_validate=true And Not editMsg)) Then%>
					<tr><td align="right" width="70"><strong>验证码:</strong></td><td align="left" style="padding:3px;"><input name="validate" type="text" size="4" class="userpass" maxlength="4" onFocus="get_checkcode();this.onfocus=null;this.select();" onKeyUp="ajaxcheckcode('isok_checkcode',this);"/> <span id="checkcode"><label style="cursor:pointer;" onClick="get_checkcode();">点击获取验证码</label></span> <span id="isok_checkcode"></span></td></tr>
				<%End If%>
			<tr>
			<%If Not replyMsg Then%>
				<%If Not editMsg Then%>
					<td align="right" width="70">
					<strong>选　项:</strong></td>
				<%End If%>
				<td align="left" style="padding:3px;">
				<label for="label5" <%If memName=empty Then%> disabled<%End If%>><input name="hiddenMsg" type="checkbox" id="label5" <%If editMsg And ReCheck=-1 Then%>value="-1" checked<%Else%>value="1"<%End If%> title="只有注册会员才可以发表隐藏留言" style="margin-top:-2px;"/>隐藏留言</label>
				<label for="label6"><input name="CopyCheck" type="checkbox" id="label6" style="margin-top:-2px;" checked/>自动复制留言到剪贴板,丢失后可以用Ctrl+V找回</label>
			<%Else%>
				<td align="left" style="padding:3px;">
				<label for="label6"><input name="CopyCheck" type="checkbox" id="label6" style="margin-top:-2px;" checked/>自动复制留言到剪贴板,丢失后可以用Ctrl+V找回</label>
			<%End If%>
				</td>
			</tr>

			<tr><td colspan="2" align="center" style="padding:3px;">
			<%If replyMsg Or editMsg Then%><input name="MsgID" type="hidden" value="<%=MsgID%>"/><%End If%>
			<input name="action" type="hidden" value="<%If replyMsg Then%>reply<%ElseIf editMsg Then%>EditMsg<%Else%>post<%End If%>"/>
			<input name="submit" type="submit" class="userbutton" value="<%If replyMsg Then%>回复留言<%ElseIf editMsg Then%>修改留言<%Else%>发表留言<%End If%>" onclick="CopyAll(Message);"/>
			<input name="button" type="reset" class="userbutton" value="重写"/>

			<%If Not stat_Admin Then%>
				<input type="button" value="检查字数" class="userbutton" onclick="GetLen(this.form); return false"/>
				<input type="button" value="显示设置" class="userbutton" onclick="$('SetContent').style.display=$('SetContent').style.display=='none'?'':'none';"/>
			<%End If%>

			<%If replyMsg Or editMsg Then%><input name="button" type="button" class="userbutton" value="返回" onclick="history.go(-1)"/><%End If%>
			</td></tr>

			<tbody id="SetContent" style="display:none">
			<%If Not stat_Admin Or Not replyMsg Or Not editMsg Then%>
				<tr><td colspan="2" align="right" >
					<%if memName=empty then%>发表留言不用注册，但是为了保护您的发言权，建议您<a href="register.asp">注册帐号</a>. <br/><%end if%> 
					字数限制 <B><%=GBSet.getKeyValue("charCount")%></B> 字 |
					UBB代码 <B><%If Not cBool(GBSet.getKeyValue("ubbCode")) Then response.write ("开启") Else response.write ("关闭") %></B> |
					[img]标签 <B><%If Not cBool(GBSet.getKeyValue("ImgCode")) Then response.write ("开启") Else response.write ("关闭") %></B><br>
				<%If memName<>Empty Then%>
					删除留言 <B><%If GBSet.getKeyValue("canDel")=0 Then
						response.write ("关闭")
					ElseIf GBSet.getKeyValue("canDel")=1 Then
						response.write GBSet.getKeyValue("ChangeTime")& "分钟内可删除"
					Else
						response.write ("允许")
					End If%></B> |
					编辑留言 <B><%If GBSet.getKeyValue("canchange")=0 Then
						response.write ("关闭")
					ElseIf GBSet.getKeyValue("canchange")=1 Then
						response.write GBSet.getKeyValue("ChangeTime")& "分钟内可编辑"
					Else
						response.write ("允许")
					End If%></B> |
					发言间隔时间 <B><%=GBSet.getKeyValue("delay")%></B> 秒
				<%End If%>
				</td></tr>
			<%End If%>
			</tbody>
			</table></form>
		</div></div>
				</td></tr>
		</td></tr></table>
	<%End If

'留言内容正文部分
If GuestDB.eof And GuestDB.bof Then
	response.write "<div style=""margin:10px 0px 10px 0px""><strong>抱歉，没有找到任何留言！</strong></div>"
Else%>
	<div class="Content"><%
	If canMessage=1 And memName=empty Then
		response.write "<div style=""margin:10px 0px 10px 0px""><strong><center>管理员关闭了游客查看留言权限,只有<font color=""red"">注册会员</font>才能查看留言,建议您<a href=""register.asp"" title=""加入本站哦"">注册账号</a>!</center></strong></div></div>"
	ElseIf canMessage=2 And Not stat_Admin Then
		response.write "<div style=""margin:10px 0px 10px 0px""><strong><center>管理员关闭查看留言权限,只有<font color=""red"">管理员</font>才能查看留言!</center></strong></div></div>"
	Else
	Do Until GuestDB.eof Or PageCount=bookPage%>
		<div class="comment" style="margin-bottom:20px;<%If blog_GravatarOpen Then%>text-align:right;<%End If%>">
	<%If blog_GravatarOpen Then
	 	'Gravatar 头像基本设置
		Dim NewGravatar, GravatarImg
		Set NewGravatar = new Gravatar
		If Not isblank(GuestDB("book_email")) Then
			NewGravatar.Gravatar_EmailMd5 = Trim(MD5(Trim(GuestDB("book_email"))))
		Else
			NewGravatar.Gravatar_EmailMd5 = ""
		End If
		GravatarImg = lcase(NewGravatar.outPut())
		Set NewGravatar = nothing%>
			<div class="commentleft Gravatar" style="float:left" id="Gravatar_<%=GuestDB("book_ID")%>">
			<img src="<%=GravatarImg%>" alt="<%=GuestDB("book_Messager")%>" border="0" />
			</div><div class="commentright" style="text-align:left">
	<%End If%>

			<div class="commenttop">
			<%If GuestDB("book_HiddenReply") Then%>
				<img src="images/icon_lock.gif" title="该留言不可见" border="0" style="margin:0px 1px -3px 0px"/>
	   		<%Else%>
				<a name="book_<%=GuestDB("book_ID")%>" href="javascript:addQuote('<%=GuestDB("book_Messager")%>『<%=DateToStr(GuestDB("book_PostTime"),"Y-m-d H:I A")%>』的留言','bookcontent_<%=GuestDB("book_ID")%>')" onclick="$('MsgContent').style.display=$('MsgContent').style.display=='none'?'':'';" title="引用 <%=GuestDB("book_Messager")%> 的留言"><img src="images/icon_quote.gif" border="0" style="margin:0px 1px -3px 0px"/></a>
			<%End If%>
			<a href="member.asp?action=view&memName=<%=Server.URLEncode(GuestDB("book_Messager"))%>"><b><%=GuestDB("book_Messager")%></b></a> <span class="commentinfo">[<%=DateToStr(GuestDB("book_PostTime"),"Y-m-d H:I A")%>
<%
			If trim(GuestDB("book_siteurl"))<>"" And trim(GuestDB("book_siteurl"))<>"http://" Then
    			response.write " | <a href="""&trim(GuestDB("book_siteurl"))&""" target=""_blank""><img src=""images/url1.gif"" border=""0""></a>"
			Else
    			response.write " | <img src=""images/nourl1.gif"">"
			End If
			If showipwho=0 And Not stat_Admin Then
				response.write " | 来自："&Look_Ip(GuestDB("book_IP"))
			End If
			If showipwho=1 And memName<>empty And Not stat_Admin Then
				response.write " | 来自："&Look_Ip(GuestDB("book_IP"))
			End If
			If stat_Admin Then
				response.write " | 来自："&Look_Ip(GuestDB("book_IP"))
			End If
			If stat_Admin Then
				If trim(GuestDB("book_email"))<>"" Then
					response.write " | <a href=""mailto:"&trim(GuestDB("book_email"))&""" target=""_blank""><img src=""images/email1.gif"" border=""0""></a>"
				Else
					response.write " | <img src=""images/noemail1.gif"">"
				End If
				If len(GuestDB("book_reply"))>0 And Not (replyMsg Or editMsg) Then
				Else
					If Not memName=GuestDB("book_Messager") Then
					response.write " |&nbsp;<a href=""LoadMod.asp?plugins=GuestBookForPJBlog&amp;action=Reply&amp;id="&GuestDB("book_ID")&"""><img src=""images/reply.gif"" title=""回复留言"" border=""0"" style=""margin-bottom:-3px""/></a>"
					End If
				End If
			End If
			If (stat_Admin And memName<>empty) Then
				response.write " |&nbsp;<a href=""Plugins/"&GBSet.GetPath&"/bookaction.asp?action=del&amp;id="&GuestDB("book_ID")&""" onclick=""If (!confirm('确定删除该留言信息吗？')) return False ""><img src=""images/del1.gif"" title=""删除留言"" border=""0""/></a>"
				response.write " |&nbsp;<a href=""LoadMod.asp?plugins=GuestBookForPJBlog&amp;action=EditMsg&amp;id="&GuestDB("book_ID")&"""><img src=""images/icon_edit.gif"" title=""编辑留言"" border=""0"" style=""margin-bottom:-3px""/></a>"
			End If
			If GuestDB("book_Messager")=memName Then
				changetime_a=Int(DateDiff("n",DateToStr(GuestDB("book_PostTime"),"Y-m-d H:I:S"),DateToStr(now,"Y-m-d H:I:S")))
				If canDel=0 And showico=0 Then
					response.write " |&nbsp;<span style=""cursor:pointer;"" onclick=""alert('管理员关闭了删除留言功能');"" title=""删除留言""><img src=""images/del1.gif"" title=""删除留言"" border=""0""/></span>"
				End If
				If canDel=1 And Not stat_Admin Then
					If int(ChangeTime) > changetime_a Then
						response.write " |&nbsp;<a href=""Plugins/"&GBSet.GetPath&"/bookaction.asp?action=del&amp;id="&GuestDB("book_ID")&""" onclick=""If (!confirm('确定删除该留言信息吗？')) return False ""><img src=""images/del1.gif"" title=""删除留言,剩余时间:"&changetime-changetime_a&"分钟"" border=""0""/></a>"
					Else
						If showico=0 Then
							response.write " |&nbsp;<span style=""cursor:pointer;"" onclick=""alert('无法删除，已经超时"&ztime(changetime_a-changetime)&"');"" title=""删除留言""><img src=""images/del1.gif"" title=""删除留言"" border=""0""/></span>"
						End If
					End If
				End If
				If canDel=2 And Not (stat_Admin) Then
					response.write " |&nbsp;<a href=""Plugins/"&GBSet.GetPath&"/bookaction.asp?action=del&amp;id="&GuestDB("book_ID")&""" onclick=""If (!confirm('确定删除该留言信息吗？')) return False ""><img src=""images/del1.gif"" title=""删除留言"" border=""0""/></a>"
				End If
				If canchange=0 And showico=0 And Not stat_Admin Then
					response.write " |&nbsp;<span style=""cursor:pointer;"" onclick=""alert('管理员关闭了编辑留言功能');"" title=""编辑留言""><img src=""images/icon_edit.gif"" title=""删除留言"" border=""0"" style=""margin-bottom:-3px""/></span>"
				End If
				If canchange=1 And Not stat_Admin Then
					If int(ChangeTime) > changetime_a Then
						response.write " |&nbsp;<a href=""LoadMod.asp?plugins=GuestBookForPJBlog&amp;action=EditMsg&amp;id="&GuestDB("book_ID")&"""><img src=""images/icon_edit.gif"" title=""编辑留言,剩余时间:"&changetime-changetime_a&"分钟"" border=""0"" style=""margin-bottom:-3px""/></a>"
					Else
						If showico=0 Then
							response.write " |&nbsp;<span style=""cursor:pointer;"" onclick=""alert('无法编辑，已经超时"&ztime(changetime_a-changetime)&"');"" title=""编辑留言""><img src=""images/icon_edit.gif"" title=""编辑留言"" border=""0"" style=""margin-bottom:-3px""/></span>"
						End If
					End If
				End If
				If canchange=2 And Not (stat_Admin) Then
					response.write " |&nbsp;<a href=""LoadMod.asp?plugins=GuestBookForPJBlog&amp;action=EditMsg&amp;id="&GuestDB("book_ID")&"""><img src=""images/icon_edit.gif"" title=""编辑留言"" border=""0"" style=""margin-bottom:-3px""/></a>"
				End If
			End If%>]
			</span></div>
			<%If (GuestDB("book_HiddenReply") And Lcase(GuestDB("book_Messager"))=Lcase(memName)) Or stat_Admin Or (Not GuestDB("book_HiddenReply")) Then %>
				<div class="commentcontent"><table border="0" cellspacing="0" cellpadding="0"><tr>
				<%If OpenFace=1 And Not blog_GravatarOpen Then%>
					<td width="100" valign="top" align="center"><img src="<%=GBSet.getKeyValue(GuestDB("book_face"))%>" alt="" border="0" style="margin-right:4px"/><div style="height:6px"></div></td><%
				End If%></div>
				<td valign="top">
			 <div class="commentcontent" id="bookcontent_<%=GuestDB("book_ID")%>">
	    <%If (stat_Admin=True Or Lcase(GuestDB("book_Messager"))=Lcase(memName)) And GuestDB("book_HiddenReply") Then%>
	    <font color="#999999">隐藏留言：</font>
	    <%End If%>
			 <%=UBBCode(HtmlEncode(GuestDB("book_Content")),0,GBSet.getKeyValue("ubbCode"),GBSet.getKeyValue("ImgCode"),GBSet.getKeyValue("autoURL"),1)%></div>
					<table width="100%" border="0" cellspacing="0" cellpadding="0">
					<tr>
					<td width="1024"></td>
					<%If len(GuestDB("book_reply"))>0 And Not (replyMsg Or editMsg) Then %>
					<td width="100%" valign="top"> 
					<div class="commenttop"><a href="javascript:addQuote('<%=GuestDB("book_replyAuthor")%>『<%=DateToStr(GuestDB("book_replyTime"),"Y-m-d H:I A")%>』的回复','replybook_<%=GuestDB("book_ID")%>')" onclick="$('MsgContent').style.display=$('MsgContent').style.display=='none'?'':'';" title="引用 <%=GuestDB("book_replyAuthor")%> 的回复"><img src="images/reply.gif" border="0" style="margin:0px 3px -3px 0px"/></a>&nbsp;<a href="member.asp?action=view&memName=<%=Server.URLEncode(GuestDB("book_replyAuthor"))%>"><b><%=GuestDB("book_replyAuthor")%></b></a>&nbsp;于<span class="commentinfo">[<%=DateToStr(GuestDB("book_replyTime"),"Y-m-d H:I A")%>]</span>&nbsp;<b>回复：</b><a href="member.asp?action=view&memName=<%=Server.URLEncode(GuestDB("book_Messager"))%>"><b><%=GuestDB("book_Messager")%></b></a>
					<%If (memName<>empty And stat_Admin) Or (cbool(GBSet.getKeyValue("canDel")) And GuestDB("book_Messager")=memName) Then%> 
						<span class="commentinfo"><%If stat_Admin Then %>[<a href="LoadMod.asp?plugins=GuestBookForPJBlog&amp;action=Reply&amp;id=<%=GuestDB("book_ID")%>"><img src="images/icon_edit.gif" title="编辑回复" border="0" style="margin-bottom:-3px"/></a>
						|&nbsp;<a href="Plugins/<%=GBSet.GetPath%>/bookaction.asp?action=delreply&id=<%=GuestDB("book_ID")%>" onclick="If (!confirm('确定删除该留言信息吗？')) return False "><img src="images/del1.gif" title="删除回复" border="0"/></a> ]<%End If%><%End If%></span></div>
					<table width="100%" border="0" cellspacing="0" cellpadding="0">
						<tr><td width="60px" valign="top"><img src="images/avatars/<%=Lcase(GuestDB("book_replyAuthor"))%>.jpg" border="0" style="margin:5px 0px 5px 10px"/></td><td><div class="commentcontent" id="replybook_<%=GuestDB("book_ID")%>"><%=UBBCode(HtmlEncode(GuestDB("book_reply")),0,0,0,1,1)%></div></td></tr></table> </td><%End If%></tr>
						</table>
					
					</td></tr></table></div>
				<%Else%>
					<div class="commentcontent"><font color="#999999">该留言是隐藏留言，只有管理员或留言者可以查看！</font></div>
				<%End If
			If blog_GravatarOpen Then response.write "</div>" End If
		response.write "</div>"
			GuestDB.movenext
			PageCount=PageCount+1
		loop
		response.write "</div>"
		If Not (replyMsg Or editMsg) Then
			response.write "<div class=""pageContent"">"&MultiPage(GuestNum,bookPage,CurPage,Url_Add,"","float:right","")&"</div>"
		End If
	End If
	GuestDB.close
	Set GuestDB=nothing
End If
If Not (replyMsg Or editMsg) Then
	If canMessage=0 Or (canMessage=1 And memName<>empty) Or (canMessage=2 And stat_Admin) Then
		response.write "[<a href=""javascript:scroll(0,0);"" title=""返回顶部"">返回顶部</a>] [<a href=""javascript:scroll(0,0),addQuote('','')"" onclick=""$('MsgContent').style.display=$('MsgContent').style.display=='none'?'':'';"" title=""点击留言"">点击留言</a>]"
	End If
End If%>
</div>
<%=content_html_Bottom%>
<div id="mainContent-bottomimg"></div>
</div>
</div>
<div id="sidebar">
<div id="innersidebar">
<div id="sidebar-topimg"><!--工具条顶部图象--></div>
<%=side_html%>
<div id="sidebar-bottomimg"></div>
</div>
</div>
<div style="font: 0px/0px sans-serif;clear: both;display: block"></div>
</div>
<%
'自定义函数
'分钟转化函数
Function ztime(ztime_1)
	Dim ztime_2,themin,thehour,theday
	ztime_2=int(ztime_1)
	theday=int(ztime_2/60/24)
	thehour=int((ztime_1-theday*60*24)/60)
	themin=ztime_2-thehour*60-theday*60*24
	If theday>365 Then
		ztime="超过一年了"
	Else
		ztime=theday & "天" & thehour & "小时" & themin & "分钟"
	End If
End Function

Function cgq(a,b)
Randomize
cgq=a&int(rnd()*b)
End Function
%>
<SCRIPT LANGUAGE="JavaScript">
function GetLen(txt) {
var MaxLen =<%=GBSet.getKeyValue("charCount")%>; 
var tmp = txt.Message.value;
var len = tmp.replace(/[\n\r]/g,"");
var len = len.length;
if (MaxLen>len)
{
mach="目前您写了 " + len + " 个字\n\n您还可以写 " + (MaxLen - len) + " 个字"
}
else
{
mach="目前您写了 " + len + " 个字\n\n超过 " + (len - MaxLen) + " 个字,请删除一些"
}
alert(mach);
}
</script>
  
<!--#include file="../../footer.asp" -->